package com.sfx.concurrent.demo.concurrent.pattern.GuardedObjectEncapsulationTest;

/**
 * Created with IntelliJ IDEA.
 * Description:测试保护性暂停模式(解耦)
 * User: sfx
 * Date: 2023-01-01
 * Time: 10:25
 */

public class TestMain {
    public static void main(String[] args) throws InterruptedException {
        for(int i =0;i<3;++i){
           new People().start();
        }
        Thread.sleep(1000);
        for(Integer id : MailBoxes.getAllId()){
            new Postman(id,""+id).start();
        }
    }
}